package icu.d4peng.basic.http.feign;

import feign.Logger;
import feign.slf4j.Slf4jLogger;

/**
 * @author d4peng d4peng@qq.com
 * @date 2023-11-26 15:36:16
 */

public class DefaultFeignLoggerFactory implements FeignLoggerFactory {

	private final Logger logger;

	public DefaultFeignLoggerFactory(Logger logger) {
		this.logger = logger;
	}

	@Override
	public Logger create(Class<?> type) {
		return this.logger != null ? this.logger : new Slf4jLogger(type);
	}

}
